<template>
	<j-cell-group>
		<j-cell title="本机编号" :tips="GeneralGeneral.LocalNo" :more="false"></j-cell>
		<j-cell title="自动退出" :tips="GeneralGeneral.AutoLogout" :more="false"></j-cell>
		<j-cell title="字号" :tips="GeneralGeneral.FontSize" :more="false"></j-cell>
		<j-cell title="日历" :more="false">
			<view slot="tips">
				<switch :checked="GeneralGeneral.IranCalendarEnable" disabled></switch>
			</view>
		</j-cell>
		<j-cell title="自动关屏延时" :tips="GeneralGeneral.ScreenAutoShutdown" :more="false"></j-cell>
		<j-cell title="屏幕保存时间" :tips="GeneralGeneral.ScreenSaveTime" :more="false"></j-cell>
		<j-cell title="硬盘满时处理策略" :tips="GeneralGeneral.OverWrite" :more="false"></j-cell>
		<j-cell title="视频输出方式" :tips="GeneralGeneral.VideoOutPut" :more="false"></j-cell>
		<j-cell title="机器名称" :tips="GeneralGeneral.MachineName" :more="false"></j-cell>
		<j-cell title="抓图间隔" :tips="GeneralGeneral.SnapInterval" :more="false"></j-cell>
	</j-cell-group>
</template>

<script>
export default {
    data() {
        return {
            token: '',
            GeneralGeneral: {
                LocalNo: '',
                AutoLogout: '',
                FontSize: '',
                IranCalendarEnable: '',
                ScreenAutoShutdown: '',
                ScreenSaveTime: '',
                OverWrite: '',
                VideoOutPut: '',
                MachineName: '',
                SnapInterval: ''
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
		this.token = options.token
		this.getconfig();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        getconfig() {
            uni.showLoading();
            let token = this.token;
            let data = {
                Name: 'General.General'
            };
            getApp().globalData.api.getconfig(data, token, (result) => {
                uni.hideLoading({
                    success: (res) => {
                        console.log(result);
                        this.GeneralGeneral = result['General.General']
                    }
                });
            });
        }
    }
};
</script>
<style></style>
